home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10932 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Getting date in UNIX
  5. Date: Wed, 20 Mar 96 21:19:51 GMT
  6. Organization: none
  7. Distribution: world
  8. Message-ID: <827356791snz@genesis.demon.co.uk>
  9. References: <4ik447$bn7@raffles.technet.sg> <314DB62F.446B@sdrc.com>
  10. Reply-To: fred@genesis.demon.co.uk
  11. X-NNTP-Posting-Host: genesis.demon.co.uk
  12. X-Newsreader: Demon Internet Simple News v1.27
  13. X-Mail2News-Path: genesis.demon.co.uk
  14.  
  15. In article <314DB62F.446B@sdrc.com> greg.dunaway@sdrc.com "Greg Dunaway" writes:
  16.  
  17. >Leonard Sim wrote:
  18. >> 
  19. >> Can anyone please inform me how to obtain the date in UNIX C??
  20. >> I just need the date in this format "dd/mm/yyyy". Thanks!!!
  21. >> 
  22. >> rdgs,
  23. >> 
  24. >> Leonard Sim
  25. >
  26. >try:
  27. >
  28. >date '+%m/%d/%Y'
  29.  
  30. I hope you don't seriously mean this. If you want a date string in a C
  31. program it would be totally inappropriate to shell out to an external
  32. command/program to do it.
  33.  
  34. >if all else fails, try reading the man pages!
  35.  
  36. You do have to pick the correct ones.
  37.  
  38. -- 
  39. -----------------------------------------
  40. Lawrence Kirby | fred@genesis.demon.co.uk
  41. Wilts, England | 70734.126@compuserve.com
  42. -----------------------------------------
  43.